package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.SysProcess;
import com.ruoyi.system.mapper.SysProcessMapper;
import com.ruoyi.system.service.ISysProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流程  业务层处理
 */
@Service
public class SysProcessServiceImpl implements ISysProcessService {

    @Autowired
    private SysProcessMapper sysProcessMapper;

    @Override
    public List<SysProcess> selectProcessList(SysProcess sysProcess) {
        return sysProcessMapper.selectProcessList(sysProcess);
    }

    @Override
    public List<SysProcess> selectAllProcesses(SysProcess sysProcess) {
        return sysProcessMapper.selectAllProcesses(sysProcess);
    }

    @Override
    public int insertProcess(SysProcess sysProcess) {
        return sysProcessMapper.insertProcess(sysProcess);
    }

    @Override
    public int updateProcess(SysProcess sysProcess) {
        return sysProcessMapper.updateProcess(sysProcess);
    }

    @Override
    public int processRemove(Long[] ids) {
        return sysProcessMapper.deleteProcessByIds(ids);
    }

    /**
     * 通过岗位ID查询岗位信息
     *
     * @param id 流程ID
     * @return 流程信息
     */
    @Override
    public SysProcess selectProcessById(Long id) {
        return sysProcessMapper.selectProcessById(id);
    }

}
